package com.ty.user.starter.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

@Data
public class RoleDto implements Serializable {
    private static final long serialVersionUID = 4223637505378405750L;
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("角色名称")
    @NotBlank(message = "角色名名称不能为空")
    @Length(min = 1, max = 20, message = "角色名称长度介于1~20位")
    private String name;

    @ApiModelProperty("备注")
    @Length(min = 1, max = 100, message = "备注长度介于1~100位")
    private String remark;

    @ApiModelProperty("角色状态")
    @NotNull(message = "角色状态不能为空")
    private Boolean state;

    @ApiModelProperty(value = "权限菜单")
    @Size(max = 10000, message = "角色权限菜单设置最大数量不能超过10000")
    private List<Long> menuIds;
}
